package com.meilele.dao.hongdian;

import com.meilele.entity.hongdian.ThiCaseBigType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface ThiCaseBigTypeMapper {
    @Delete({
        "delete from thi_case_big_type",
        "where big_type_id = #{bigTypeId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer bigTypeId);

    @Insert({
        "insert into thi_case_big_type (big_type_id, case_big_type)",
        "values (#{bigTypeId,jdbcType=INTEGER}, #{caseBigType,jdbcType=VARCHAR})"
    })
    int insert(ThiCaseBigType record);

    int insertSelective(ThiCaseBigType record);

    @Select({
        "select",
        "big_type_id, case_big_type",
        "from thi_case_big_type",
        "where big_type_id = #{bigTypeId,jdbcType=INTEGER}"
    })
    @ResultMap("com.meilele.dao.hongdian.ThiCaseBigTypeMapper.BaseResultMap")
    ThiCaseBigType selectByPrimaryKey(Integer bigTypeId);

    int updateByPrimaryKeySelective(ThiCaseBigType record);

    @Update({
        "update thi_case_big_type",
        "set case_big_type = #{caseBigType,jdbcType=VARCHAR}",
        "where big_type_id = #{bigTypeId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(ThiCaseBigType record);
}